package com.origin.app;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.origin.uilibrary.xrecycleview.xr.BaseRefreshHeaderView;

public class MyRefreshHeaderView extends BaseRefreshHeaderView {
    public MyRefreshHeaderView(Context context) {
        super(context);
    }

    public MyRefreshHeaderView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public MyRefreshHeaderView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public MyRefreshHeaderView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    TextView tv;

    @Override
    public void initContainerView() {
        tv = mContainer.findViewById(R.id.tv);
    }

    @Override
    public int getLayout() {
        return R.layout.my_refresh;
    }

    @Override
    public void destroy() {

    }

    @Override
    public void refreshing() {
        tv.setText("刷新中...");
    }

    @Override
    public void refreshDone() {
        tv.setText("刷新完成");
    }

    @Override
    public void dropDown() {
        tv.setText("下拉中...");
    }

    @Override
    public void normal() {
        tv.setText("普通");
    }
}
